package com.woniuxy.house.web;

import com.woniuxy.house.entity.PageBean;
import com.woniuxy.house.entity.Source;
import com.woniuxy.house.service.HouseownerRentService;
import com.woniuxy.house.service.MonthlyRentService;
import com.woniuxy.house.vo.ResponseEntity;
import com.woniuxy.house.vo.SourceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/houseOwnerRent")
public class HouseownerRentController {
@Autowired
    private HouseownerRentService houseownerRentService;
@RequestMapping("getPage")
/**@魏锦鹏
 * 点击房东直租按钮进入房东直租界面显示数据
 * 按条件查询房东直租数据
 */
    public ResponseEntity getAll(@RequestBody SourceVo HouseOwner){
    PageBean<Source> pageData = houseownerRentService.getByPage(HouseOwner.getSource()==null?new Source():HouseOwner.getSource(), HouseOwner.getPage() == null ? 1 : HouseOwner.getPage());
    return new ResponseEntity<>("200","success",pageData);
}
}
